Method, apparatus and system for managing routes

ABSTRACT

The present invention discloses a method, an apparatus, and a system for managing routes, enables the MG to implement routing functions in the network communications field, and facilitates the operations on the routing table in the MG. A route context stores route records, and the MG searches for a route by searching for the corresponding route context only, thus facilitating the route management. The embodiments of the present invention are primarily applied to the MG and the MGC, especially to the MG that implements the routing functions.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2009/070749, filed on Mar. 11, 2009, which claims priority toChinese Patent Application No. 200810090833.6, filed on Apr. 2, 2008,both of which are hereby incorporated by reference in their entireties

FIELD OF THE INVENTION

The present invention relates to the network communications field, andin particular, to a method for managing routes in a Media Gateway (MG)after the MG implements the routing function, and to an apparatus and asystem for applying the route management method.

BACKGROUND OF THE INVENTION

As shown in FIG. 1, a Next Generation Network (NGN) includes an MG and aMedia Gateway Controller (MGC). The MGC is designed to manage callstates and control bearer resources of the MG. The MG is designed to:convert the format of media streams, for example, converts a Pulse CodeModulation (PCM) timeslot in a Circuit-Switched (CS) network into aReal-time Transport Protocol (RTP) media stream in an Internet Protocol(IP) network; create, modify, and release media streams, and manageresources under signaling control of the MGC.

The MG may be used as a border gateway between networks of different IPsegments to transmit media streams between such networks. When the MGserves as a border gateway, the MG generally works in Back-to-Back (B2B)mode. That is, IP terminations are created in two networks of twodifferent IP segments separately, and media stream channels are createdbetween the two IP networks through the IP termination. Inside the MG,the two IP terminations are placed in the same context, thus creating acomplete media stream transmission channel and enabling transmission ofmedia streams between two networks of different IP segments. In B2Bmode, when the media stream passes through the MG, the MG needs tomodify the source address and the destination address of the mediastream in order to transmit the media stream to the destination network.

When the MG serves as a border gateway between different IP networks,the MG may work in an IP Router (IPR) mode. That is, the MG implementsthe routing function, and the source address and the destination addressdo not need to be modified when the media stream passes through the MG.The MG searches a routing table maintained in the MG to obtain theegress interface corresponding to the destination address and thenext-hop address.

Currently, when the MGC manages and controls the MG, events areexchanged between the MGC and the MG through H.248, and the routingtable is stored in the MG through an H.248 property expressed as asub-list of string. A routing table is composed of route records(namely, routes). When a routing table includes a large number of routerecords, for example, 100,000 records, each operation for the H.248property is equivalent to operation for the entire routing table becausethe routing table is stored through an H.248 property. Consequently, itis not convenient to operate a specified route record accurately, andtherefore operations on routes are rather inconvenient.

SUMMARY OF THE INVENTION

The embodiments of the present invention provide a method, an apparatus,and a system for managing routes to invoke or operate routes or arouting table conveniently.

To achieve such objectives, the embodiments of the present invention arebased on the following technical solution:

A route managing method includes:

by an MG, creating a route context that stores at least one routerecord; and

managing the route record by operating the route context.

A route management apparatus includes:

a creating module, configured to create a route context that stores atleast one route record in an MG

A route management system includes:

an MGC, configured to control an MG to create a route context; and anMG, configured to create the route context under control of the MGC,where the route context stores at least one route record.

In the embodiments of the present invention, a route context storesroute records. At the time of performing management operations on aroute, only the context corresponding to the route needs to be operated.In this way, every route can be operated separately, thus facilitatingoperation and management on route records.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a networking diagram of an MG and an MGC in the prior art;

FIG. 2 is a flowchart of a route management method of an MG inEmbodiment 1 of the present invention;

FIG. 3 is a block diagram of a route management apparatus of an MG inEmbodiment 1 of the present invention;

FIG. 4 is a flowchart of a route management method of an MG inEmbodiment 2 of the present invention;

FIG. 5 is a flowchart of adding a route in the route management methodof an MG in Embodiment 2 of the present invention;

FIG. 6 is a flowchart of deleting a route in the route management methodof an MG in Embodiment 2 of the present invention;

FIG. 7 is a flowchart of modifying a route in the route managementmethod of an MG in Embodiment 2 of the present invention; and

FIG. 8 is a block diagram of a route management apparatus of an MG inEmbodiment 2 of the present invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Two new concepts are introduced: Interface IPR Context (“interfacecontext” for short), and Route IPR Context (“route context” for short).

The interface context describes the connection between interfaces on theMG, and a termination in the interface context represents an interface.The IP packet received on an interface/termination leaves the MG throughanother interface/termination in the interface context. By filtering,monitoring and collecting statistics on the terminations in theinterface context, the interface-level filtering, monitoring andstatistics collecting can be implemented. The interfaces on an MG aregrouped into one or more groups. The interfaces in each group are placedin the same interface context; and no forwarding of IP packets occursbetween an interface of a group and an interface of a different group.

The route context is designed to manage the routing table. A routecontext includes two terminations, representing an ingress terminationand an egress termination. A route context describes a route record inthe routing table. The route record is described through a contextproperty or a property on a termination in the context. Therefore, whena new route context is created, a new route record is added in therouting table. If all terminations in the route context are deleted, theroute context is deleted and the route record described by the routecontext is deleted from the routing table. An alternative solution isprovided herein: The data type of the context property or the propertyon the termination is defined as a list, and one route context describesmultiple route records.

A route context represents an abstract route record, and an IP streamflows through the MG through the termination in the interface context.The route context is primarily designed to store route records. Twoterminations in the route context are also abstract concepts. It ispossible that only one termination is created in a route context, andfiltering, events or statistics set for the IP stream which uses thestored route record may be set to this termination.

In this embodiment, a route context is created to store routes;operations on the route are performed by operating the correspondingroute context without always accessing the entire routing table.

A correlation may be created between the interface context and the routecontext. In this way, a route context can be searched out more quicklyaccording to the correlation. An optional mode is: A context property inthe route context carries a context identifier (ID), through which acorrelation is created between the route context and the interfacecontext.

In this embodiment, a type property (Route Type) of the contextrepresents the route context and the interface context. This typeproperty is an enumeration variable, and its value is IIPR, RIPR, orB2B.

The value “IIPR” indicates that the context is an interface IPR context,or also known as interface context. The value “RIPR” indicates that thecontext is a route IPR context, or also known as route context. Thevalue “B2B” indicates that the context is an ordinary B2B context.

The route context is designed to maintain a route, and generallyincludes two interfaces (T1 and T2), which are the ingress interface andthe egress interface of the IP packet of the route respectively. Becausea route has a definite egress interface but has no specified ingressinterface, T2 may refer to a specific egress interface, but T1represents any possible ingress interface of the route. In order to makea route context identify a route, the route context needs to have a newcontext property “route record” for storing route records. The data typeof the route record is a string. The string stores a route record whichincludes basic information such as destination network address, mask,next-hop address, and egress interface ID. The route record may includeadditional information such as cost (overhead). The format of the stringis:

“network destination“|”netmask“|”Next Hop ID“|”Interface ID“|”cost”. Forexample: “10.85.28.0|255.255.254.0|10.85.29.160|interface1|1”, where:10.85.28.0 is a destination network address, 255.255.254.0 is a mask,10.85.29.160 is a next-hop address, and “interface1” is the name of theegress interface, and 1 is the overhead.

A route record may also be described through a property on thetermination in the route context; or a string list format is definedthrough the property on the termination in the route context to describeone or more route records; or the context property of the route contextis defined as a string list format for describing one or more routerecords.

An interface context includes interfaces covered in the same group, andpackets can be routed and forwarded between such interfaces. Through acorrelation property in the route context, a route can be searched outby searching for the route context corresponding to the correlationproperty of the interface context and searching for the route record inthe route context. In this way, the search scope of the route context isnarrower, and the route search is faster.

An ordinary context processes an IP packet by forwarding the IP packetin B2B mode based on the prior art, namely, the source address and thedestination address needs to be modified.

After the IP packet arrives at the interface of the MG, the MG judgeswhether the IP packet needs to be transmitted through an ordinarycontext or an interface context plus a route context according to thedestination address of the IP packet. Specifically, if the destinationaddress of the IP packet is the same as the address of the interfacethat receives the IP packet, the IP packet needs to be processed throughan ordinary context; otherwise, the IP packet needs to be processedthrough an interface context and a route context.

The embodiments of the route management method and apparatus of the MGare elaborated below with reference to the accompanying drawings.

Embodiment 1

As shown in FIG. 2, the route management method in this embodimentincludes the following steps:

201. The MG creates a route context.

The MGC instructs the MG to create a route context, namely, creates acontext whose type property value is “RIPR”. The route context storesone route record. That is, the route record is set in the Route Recordproperty. The format of the route record is: networkdestination“|”trnetmask“|”Next Hop ID“|”Interface ID“|”cost.

202. The MG manages the route record by operating the route context.

The MG operates the route context corresponding to the route record tomanage the route record when necessary.

Corresponding to the foregoing MG route management method, an MG routemanagement apparatus is provided in this embodiment. As shown in FIG. 3,the apparatus includes a creating module. The creating module creates aroute context in the MG, namely, creates a context whose type propertyvalue is “RIPR”, and then a Route Record property is added in the routecontext. The Route Record property stores a route record.

A route management system is provided in this embodiment. The routemanagement system includes an MG and an MGC. The MGC controls the MG tocreate a route context, namely, create a context whose property value is“RIPR”. The Route Record property of this route context stores at leastone route record.

In this embodiment, route records are stored through a route context.When the MG needs to perform a management operation for a route, the MGmay search out the route in the route context that stores the routerecord. In this way, every route in the masses of route records can beoperated separately, and therefore the route record can be operated andmanaged conveniently.

The MGC can set the route record on the MG according to the methodprovided in this embodiment. The MGC can also modify the Route Recordproperty or delete a route context.

Embodiment 2

This embodiment makes improvement on the basis of Embodiment 1. As shownin FIG. 4, the MG route management method in this embodiment includesthe following steps:

401. Create an interface context for interfaces in the same group on theMG.

The MGC controls the MG to create an interface context for theinterfaces in the same group on the MG, namely, create a context whosetype property value is “IIPR”. Generally, the interfaces of the MG aregrouped into at least one group. IP packets can be forwarded between theinterfaces in each group, but cannot be forwarded between an interfacein a group and an interface in a different group. In order todiscriminate interfaces in different groups, the MG creates an interfacecontext for the interfaces in the same group on the MG, namely, createsa context whose type property value is “IIPR”.

The interface context includes topological relationships betweeninterfaces in the group. It is assumed that a group includes threeinterfaces: T1, T2 and T3. The topological relationships are describedas follows:

T1T2 oneway: Data can be forwarded from T1 to T2, but data cannot beforwarded from T2 to T1, namely, a unidirectional channel exists betweenT1 and T2;

T1 T3 bothway: Data can be exchanged between T1 and T3; and

T2 T3 bothway: Data can be exchanged between T2 and T3.

Topological control is exercised in the MG properly through theforegoing topological relationships.

402. Create a route context in the MG.

When the MG generates a dynamic route through a Dynamic Routing Protocol(DRP) or generates a static route through configuration, a route recordneeds to be added, and a route context whose type property value is“RIPR” needs to be created in the MG. The newly added route record isstored in the route context.

One route context stores one route record. That is, the route record isstored in the Route Record property. The format of the stored routerecord is: “network destination“|”netmask“|”Next op ID“|”InterfaceID“|”cost”.

403. Create a correlation between the interface context and the routecontext.

A value is assigned to the correlation property in the route context,and the correlation property may be defined as integer data. In thisembodiment, the value assigned to the correlation property may be thecontext ID of the relevant interface context. A route can be searchedout according to the value of the correlation property, namely, therelevant route context is searched out according to the context ID ofthe interface context. In this way, the search scope is narrower, andtherefore the search process is faster.

404. Manage the route records by operating the route context.

The MG manages a route record (for example, modifies or deletes theroute record) by operating the corresponding route context. In the routemanagement method described above, a route context is used to manageroutes. The route context stores route records. At the time of operatinga route record, it is not necessary to invoke all route contexts, but itis necessary to invoke the route context related to this route recordonly, thus facilitating the operation. A correlation property is definedin the interface context and the route context. A route can be searchedout by searching for the relevant route context according to the contextID of the interface context. In this way, the search scope is narrower,and the search process is faster.

The DRP on the MG may refresh the routes anytime, and the MG may refreshthe static routes due to change of the statistic route configuration.Therefore, the routes in the MG need to be operated (for example, added,deleted, or modified) when necessary. As shown in FIG. 5, the process ofadding a route based on the MG route management method in thisembodiment includes the following steps:

501. The MG detects whether a new route is added.

The MG may use a DRP to discover the new route and obtain theinformation about the new route. The information about a new routeincludes: destination network address of the new route, mask, next-hopaddress, and egress interface number.

502. The MG sends an add-route event to the MGC after discovering a newroute.

After discovering a new route, the MG sends an event about the new routeto the MGC. A parameter of the event carries the new route record (theformat of the route record is the same as the Route Record propertydefined above), namely, route information such as destination networkaddress, mask, next-hop address, and egress interface number obtained instep 501.

To enable the MG to send the event to the MGC, a New Route Record (NRR)event is added for reporting the new route. The NRR event is detected onthe termination of the interface context. The parameter “entries” ofthis event carries the new route record. This parameter may carry one ormore route records. For the format of this parameter, see the RouteRecord property defined above.

503. The MGC generates an instruction for adding a route recordaccording to the received add-route event.

According to the add-route event and the route record in the event, theMGC generates an instruction for adding a route record (which isgenerally an H.248 message). Because a new route record may be stored inthe existing route context (if one route context can store multipleroute records), or stored in a newly added route context, theinstruction for adding a route record varies and depends on the featureof the new route record. For example, the instruction may be aninstruction for adding a route context, or an instruction for adding aroute record in the route context.

504. The MGC sends the generated instruction for adding a route recordto the MG.

505. The MG adds a route record according to the received instructionfor adding a route record, as detailed below:

If the MG receives an instruction for adding a route record in the routecontext, because the defined format of the Route Record property is asub-list of string, the MG adds a string into the sub-list of string ofthe Route Record property in a specified route context. The string isthe new route record.

If the MG receives an instruction for adding a route context, the MGcreates a route context, and stores the Route Record property of thecreated route context as the new route record.

As shown in FIG. 6, the process of deleting a route based on the MGroute management method in this embodiment includes the following steps:

601. The MG detects whether a route needs to be deleted.

For example, through the DRP, the MG discovers that a route needs to bedeleted, or a route record is deleted through static configuration of anetwork management system on the MG

602. The MG sends a delete-route event to the MGC after discovering thata route needs to be deleted.

If all route records in a route context need to be deleted, the eventincludes the route context ID to be deleted. If the applied solutionallows a route context to store more than one route record, and aspecific route context includes two or more route records but only apart of the route records needs to be deleted, the event needs tofurther include the route records that need to be deleted. A newly addedevent property bears the information carried in this event.

To enable the MG to send the event to the MGC in this step, a DeleteRoute Record (DRR) event is added for reporting the deletion of theroute record. The DRR event is detected on the termination of theinterface context. A parameter “context ID” is defined for the DRR eventto carry the route context ID. This event may carry one or more routecontext IDs. A parameter “entries” is defined for the DRR event to carrythe deleted route record. This parameter may carry one or more routerecords that need to be deleted. Before the route record is deleted, theroute record is stored in the Route Record property of the routecontext. If a route context stores no route record, it is recommended todelete this route context by deleting all terminations in it.

603. The MGC generates an instruction for deleting route records.

After receiving the delete-route event, the MGC needs to generate aninstruction for deleting route records according to the informationcarried in the event, and send the instruction to the MG.

604. The MG deletes the route context or route records according to theinstruction for deleting route records.

After receiving the instruction for deleting route records, the MGsearches out the route context according to the information carried inthe instruction and deletes the route context, or deletes the routerecords that need to be deleted from the context.

When the route changes, the MG may add a route or delete a routeaccording to the methods illustrated in FIG. 5 and FIG. 6 to modify theroute.

As shown in FIG. 7, in order to modify the route quickly, the steps ofoperating a route based on the MG route management method in thisembodiment are as follows:

701. The MG detects whether route change occurs.

Detecting route change is to detect whether a route needs to be modifiedto another route. A possible scenario of route change is one of thefollowing: The next-hop routing device fails, the network topologychanges, route negotiation based on the DRP occurs between routingdevices, and the next-hop address changes. In this case, part of theroute records changes.

702. The MG sends an update-route event to the MGC after discoveringthat route change occurs.

When discovering the route change, the MG sends an update-route event tothe MGC. The event carries a route context ID to be deleted, and thetarget route records to which the source route records need to bemodified. If the context stores more than two route records, the eventneeds to carry the route records that need to be modified.

To enable the MG to send the update-route event to the MGC in this step,an Update Route Record (URR) event is added for reporting the modifiedroute records. This event is detected on the termination of theinterface context. A parameter “context ID” is defined for the URR eventto carry the route context ID, a parameter “ofib” is defined for the URRevent to carry the updated route records, and a parameter “nfib” isdefined for the URR event to carry the target route records to which thesource route records are updated. In practice, the URR event in thisembodiment may be used to report modification of more than two routerecords. That is, the “ofib” parameter carries multiple updated routerecords, and the “nfib” parameter carries the corresponding target routerecords.

703. The MGC generates an instruction for modifying route recordsaccording to the update-route event.

After receiving the update-route event, the MGC generates an instructionfor modifying route records, and sends the instruction to the MG.

704. The MG modifies the route records in the route context to bemodified, to the target route records.

After receiving the instruction for modifying route records, the MGfinds the route context according to the route context ID to bemodified, and modifies the corresponding route records in the foundroute context to the target route records.

In the modification steps above, the MG needs to interact with the MGConly once, thus shortening the interaction time and modifying the routemore quickly.

If a route context is defined to carry only one route record, neitherthe “entries” parameter of the DRR event nor the “ofib” parameter of theURR event is required.

If the NRR event and the DRR event are defined as being detected andreported on the termination in the route context, it is not necessaryfor the event parameter to carry the route context ID because themessage body itself carries the context ID of the route contextcorresponding to the termination.

If the route is refreshed too quickly, for example, the MG obtainsplenty of route records through DRP shortly after startup, if the eventis reported too quickly, the network may be congested. Therefore, aparameter may be defined to set the speed of the MG reporting themessages of adding, deleting and modifying routes. For example, athreshold of the number of events reported per second is set.

Corresponding to the foregoing MG route management method, an MG routemanagement apparatus is provided in this embodiment. As shown in FIG. 8,the apparatus includes a creating module 81 and a searching module 87.The creating module 81 creates a route context in the MG, namely,creates a context whose type property value is “RIPR”, and then a RouteRecord property is added in the route context. The Route Record propertystores a route record. Moreover, the creating module 81 is furtherconfigured to: create an interface context for each group of interfaces,where the interface context includes a topological relationship betweeninterfaces in each group; and add a correlation property in theinterface context and the route context. If the interfaces in theinterface context are the same as the interfaces in the route context,their correlation property is set to the same value, for example, set tothe context ID of the interface context.

In the case of searching for a route record, the searching module 87searches all route contexts whose correlation property is the same asthe correlation property of the corresponding interface context, namely,searches all route contexts whose correlation property is thecorresponding interface context ID.

In order to operate the route context and the interface context, the MGroute management apparatus in this embodiment includes: a detectingmodule 82, a sending module 83, a receiving module 84, a deleting module85, and a modifying module 86.

The detecting module 82 is configured to detect the route change,primarily detect whether a route is added, deleted or modified.

After detecting that a route is added, deleted, or modified, the sendingmodule 83 sends the corresponding operation event to the MGC. Ifdetecting that a route is added, the sending module sends an NRR eventthat carries the new route record; if detecting that a route is deleted,the sending module sends a DRR event that carries the ID of the routecontext to be deleted, or carries the route records to be deleted andthe corresponding route context ID; and if detecting that a route ismodified, the sending module sends an URR event that carries the ID ofthe route context to be modified, and the modified target route record.

According to the operation request sent by the MG, the MGC generates thecorresponding operation instruction and sends the instruction to the MG.The MG receives the operation instruction through the receiving module84.

After receiving an instruction for adding a route record from the MGC,the MG may perform the following operations:

search for an existing route context through the creating module 81, andadd the new route record into the Route Record property of the routecontext; or

create a new route context through the creating module 81, and store thenew route record into the Route Record property of the new routecontext.

If receiving an instruction for deleting route records from the MGC, thedeleting module 85 of the MG deletes the route context corresponding tothe route context ID; or finds the context corresponding to the contextID and deletes the route records that need to be deleted in the context.

If receiving an instruction for modifying route records, the modifyingmodule 86 of the MG modifies the route records in the correspondingroute context to the target route records.

In the embodiment described above, the MG reports an operation requestto the MGC, and then the MGC sends the corresponding operationinstruction. In practice, the MGC may send an operation instruction tothe MG directly being without requested, for example, an instruction foradding, deleting or modifying a route record. After receivinginstruction, the receiving module 84 of the MG performs thecorresponding operation according to the instruction. The specificoperation is performed by the creating module 81, deleting module 85, ormodifying module 86. The detailed operations have been described above.

The MG and the MGC make up a route management system. The MGC controlsthe MG to create a route context and an interface context, and create acorrelation in the interface context and the route context. Through theH.248 protocol, the MGC controls the MG to operate the routes, forexample, add, delete or modify routes. Such operations are the same asthe processes illustrated in FIG. 5, FIG. 6 and FIG. 7.

The embodiments of the present invention are applied to the MG and theMGC, especially in the case that the MGC manages the routes in the MG.

In the embodiments of the present invention, a route context stores theroute records. Therefore, the route records can be operated by operatingthe route context, which facilitates the operation.

In the case of adding, deleting or modifying a route record, the MG mayreport an event; after receiving the event, the MGC controls the MG toperform operations, which is applicable when MGC controls the MGautomatically. In the case of adding, deleting or modifying a routerecord, the MGC may control the MG to perform operations directlywithout receiving any event from the MG, which is applicable to manualcontrol.

After reading the foregoing embodiments, those skilled in the art areclearly aware that the embodiments of the present invention may beimplemented through hardware, or, preferably in most circumstances,through software in addition to a necessary universal hardware platform.Therefore, the technical solution under the present invention or itsnovelty in contrast to the prior art may be embodied in a softwareproduct. The software product is stored in a computer-readable storagemedium such as computer floppy disk, hard disk and CD-ROM, andincorporates several instructions for instructing a computer device (forexample, personal computer, server, or network device) to execute themethod specified in each embodiment of the present invention.

The above descriptions are merely preferred embodiments of the presentinvention, but not intended to limit the scope of the present invention.Any modifications, variations or replacement that can be easily derivedby those skilled in the art should fall within the scope of the presentinvention. Therefore, the protection scope of the present invention issubject to the appended claims.

What is claimed is:
 1. A route management method, comprising: creating,by a Media Gateway (MG), a route context that stores at least one routerecord; and managing, by the MG, the route record by operating the routecontext, wherein the managing the route record by operating the routecontext comprises: detecting that a new route is added; sending anadd-route event that carries a new route record to a Media GatewayController (MGC); receiving an instruction for adding the new routerecord from the MGC; creating the route context according to theinstruction for adding the new route record, wherein the at least oneroute record stored in the route context is the route record carried inthe add-route event.
 2. The route management method according to claim1, further comprising: creating an interface context for interfaces ofthe MG; and creating a correlation between the interface context and theroute context.
 3. The route management method according to claim 2,further comprising: searching for the route context according to thecorrelation between the interface context and the route context.
 4. Theroute management method according to claim 2, wherein the creating theinterface context for the interfaces of the MG comprises: grouping allinterfaces of the MG into at least one group; and creating an interfacecontext for each group of interfaces separately.
 5. The route managementmethod according to claim 1, wherein the managing the route record byoperating the route context further comprises: detecting a route thatneeds to be deleted; sending a delete-route event to the MGC, whereinthe delete-route event carries a route context identifier (ID) of theroute to be deleted, or carries route records to be deleted and a routecontext ID corresponding to a route context that covers the routerecords to be deleted; receiving an instruction for deleting the routerecords from the MGC; and deleting a route context corresponding to theroute context ID according to the instruction for deleting the routerecords, or deleting the route records that need to be deleted from theroute context that corresponds to the route context ID and covers theroute records to be deleted.
 6. The route management method according toclaim 1, wherein the managing the route record by operating the routecontext further comprises: detecting a route that needs to be modified;sending an update-route event to the MGC, wherein the update-route eventcarries a route context identifier (ID) to be modified, and target routerecords of the modification; receiving an instruction for modifyingroute records from the MGC; and modifying the route records in the routecontext to be deleted to the target route records, according to theinstruction for modifying the route records.
 7. The route managementmethod according to claim 1, wherein the managing the route record byoperating the route context further comprises: receiving at least one ofthe following: an instruction for adding a route record; an instructionfor deleting route records; and an instruction for modifying routerecords; and changing the route records according to the receivedinstruction.
 8. A route management apparatus, comprising: a creatingmodule, configured to create a route context that stores at least oneroute record in a Media Gateway (MG); a detecting module, configured todetect whether there is a new route; a sending module, configured tosend an add-route event that carries a new route record to a MediaGateway Controller (MGC) if a new route is detected; and a receivingmodule, configured to receive an instruction for adding the new routerecord from the MGC; wherein the creating module is further configuredto add the route record carried in the event into a created routecontext according to the instruction for adding the route record; orcreate a route context according to the instruction for adding the routerecord and store the route record carried in the event into the createdroute context.
 9. The route management apparatus according to claim 8,wherein: the creating module is further configured to create aninterface context for interfaces of the MG; and create a correlationbetween the interface context and the route context.
 10. The routemanagement apparatus according to claim 9, further comprising: asearching module, configured to search for the route context accordingto the correlation between the interface context and the route context.11. The route management apparatus according to claim 8, wherein: thedetecting module, further configured to detect whether a route needs tobe deleted; the sending module, further configured to send adelete-route event to the MGC if the route to be deleted is detected,wherein the delete-route event carries a route context identifier (ID)of the route to be deleted, or carries route records to be deleted and aroute context ID corresponding to a route context that covers the routerecords to be deleted; the receiving module, further configured toreceive an instruction for deleting route records from the MGC; and theroute management apparatus further comprises: a deleting module,configured to delete a route context corresponding to the route contextID according to the instruction for deleting the route records, ordelete the route records that need to be deleted from the route contextthat corresponds to the route context ID and covers the route records tobe deleted.
 12. The route management apparatus according to claim 8,wherein: the detecting module, further configured to detect whether aroute needs to be modified; the sending module, further configured tosend an update-route event to the MGC if the route to be modified isdetected, wherein the update-route event carries a route contextidentifier (ID) to be modified, and target route records of themodification; the receiving module, further configured to receive aninstruction for modifying route records from the MGC; and the routemanagement apparatus further comprises: a modifying module, configuredto modify the route records in the route context to be deleted to thetarget route records, according to the instruction for modifying theroute records.
 13. A route management system, comprising a Media GatewayController (MGC) and a Media Gateway (MG), wherein: the MG is configuredto create a route context that stores at least one route record in theMG; detect whether there is a new route; send an add-route event thatcarries a new route record to the MGC if a new route is detected;receive an instruction for adding the new route record from the MGC; andthe MG is further configured to add the route record carried in theevent into a created route context according to the instruction foradding the route record; or create a route context according to theinstruction for adding the route record and store the route recordcarried in the event into the created route context.